package Server;

import Client.Client;
import java.io.Serializable;
import java.net.Socket;

/**
 *
 * Obiekty jest klasy reprezentuja polaczonego z serverem klienta.
 * Poza wszystkim, co ma normalny klient, zawiera takze dane niezbedne
 * do komunikacji z tymze serwerem:
 *
 * + Adres klienta
 * + Socket
 * + ...
 *
 * @author Kamil Gajowy
 */
public class ServerClientInstance implements Serializable {
    private Client client;
    private transient Socket socket;

    /**
     * for serialization only!
     */
    public ServerClientInstance(){

    }

    /**
    * Default constructor.
     * @param client Client instance
     * @param clientSocket Client's Socket from server
     */
    public ServerClientInstance(
            Client client,
            Socket clientSocket)
    {
        this.client = client;
        this.socket = clientSocket;
    }

    /**
     * @return the client
     */
    public Client getClient() {
        return client;
    }

    /**
     * @return the socket
     */
    public Socket getSocket() {
        return socket;
    }

    /**
     * @param socket the socket to set
     */
    public void setSocket(Socket socket) {
        this.socket = socket;
    }

}//end class
